package com.neuedu.hrbu.sca.controller;

import com.neuedu.hrbu.sca.entity.Order;
import com.neuedu.hrbu.sca.entity.Product;
import com.neuedu.hrbu.sca.service.OrderService;
import com.neuedu.hrbu.sca.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者: 张金山
 * 创建时间：2025/1/26 17:36   星期日
 * 描述：
 * 项目: spring-cloud-parent - com.neuedu.hrbu.sca
 * 作者的博客:  https://blog.fulfill.com.cn
 */

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    /**
     * http://localhost:8901/order/get/1
     * @param oid
     * @return
     */
    @RequestMapping("/get/{oid}")
    public Order getById(@PathVariable("oid") Integer oid){
        return orderService.getById(oid) ;
    }


}
